<?php

namespace App\Kuafu\Config\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class ConfigCacheEnum extends BaseCodeEnum
{
    private const CONFIG_TYPE     = 'config:%s_%s';
    private const CONFIG_TYPE_ONE = 'config_one:%s_%s';

    /**
     * config配置列表
     * @param string $type
     * @return string
     */
    public static function getConfigType(string $type, string $key = ''): string
    {
        return sprintf(self::CONFIG_TYPE, $type, $key);
    }

    /**
     * config配置列表
     * @param string $type
     * @return string
     */
    public static function getConfigTypeOne(string $type, string $key = ''): string
    {
        return sprintf(self::CONFIG_TYPE_ONE, $type, $key);
    }
}
